package com.yykj.drup.server.service.feign;

import com.yykj.common.vo.ResultVO;
import com.yykj.drup.client.WiFenXiaoOrder;
import com.yykj.drup.client.form.WiFenXiaoPayOrderFrom;
import com.yykj.drup.server.service.feign.fallback.WiFenXiaoServerFeignFallBack;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author zeng
 * @Date 2022/4/1
 */
@Service
@FeignClient(name = "wifenxiao-server", fallbackFactory = WiFenXiaoServerFeignFallBack.class)
public interface WiFenXiaoServerFeign {

    @ApiOperation("微分销商城-门店下单")
    @PostMapping("/wifenxiao/order/payOrder")
    ResultVO<WiFenXiaoOrder> payOrder(@RequestBody WiFenXiaoPayOrderFrom wiFenXiaoPayOrderFrom);

    @ApiOperation("微分销商城-查询订单")
    @GetMapping("/wifenxiao/order/findOrder")
    WiFenXiaoOrder findOrder(@RequestParam("orgOrderNu") String orgOrderNu);
}
